<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="11">dsd</div>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br><br>
    <br>

    <br>
    <br><br><br><br><br><br><br>
    <br><br><br><br><br> <br><br>
    <br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br> <br><br><br>
    <br><br><br><br><br><br><br><br><br><br>
    <div>ee</div>
    <script>
        // 获得文档和视口的高度， offsetHeight会在下面解释
        var documentHeight = document.documentElement.offsetHeight;
        var viewportHeight = window.innerHeight; // 或使用上面的getViewportSize();
        // 然后，滚动让最后一页在视口中可见
        console.log(documentHeight,viewportHeight)
        window.scrollTo(0, documentHeight - viewportHeight);
    </script>
</body>